<?php

namespace App\Models;

/**
 * Class Vip
 * @property integer id
 * @property string title
 * @property integer day_num
 * @property float price
 * @property string cover
 * @property boolean|false recommend
 * @property string recommend_icon
 * @property boolean|false status
 */
class Vip extends ApplicationModel
{
    protected $fillable = [
        'title',
        'day_num',
        'price',
        'cover',
        'recommend',
        'recommend_icon',
        'status',
    ];

    public function scopeRelease($query)
    {
        return $query->where('status', true)->orderBy('sort', 'desc');
    }
}
